<style>
	.element_right
	{
		float:right;
	}
</style>
<div class="row">
<div class="panel callout"><h6>Edit Grade Level Access For <?php echo $emp_user_data->username; ?></h6></div>
	<?if(isset($system_message))echo $system_message;
		echo validation_errors('<div data-alert class="alert-box alert">', '</div>');
	?>
	<div></div>
	<?=form_open('employee_settings/edit_manage_employees_access/' .$emp_user_data->emp_id, array('class'=>'custom submit_forms')); ?>
	<div class="row">
		<div class="large-12 columns">
		<div class="large-2 columns">
			<label>Grade Levels</label>
		</div>
			
		<div class="large-10 columns">
			<table class="responsive" style="width:100%;">
				<tr>
				<?php
				if($access_levels){
				foreach($access_levels as $access_level):
					$als[] = $access_level->level_id;
				endforeach;
				}else{
					$als[] = '';
				}
				$i = 0;
				foreach($levels as $level):
				$i++;
				$al = $level->level_id;
				if (in_array($al, $als)) 
				{
				?>
				<td>
					<?=form_checkbox('grade_level[]', $level->level_id, TRUE);?>
				</td>
				<?php
				}
				else
				{
				?>
				<td>
					<?=form_checkbox('grade_level[]', $level->level_id, FALSE);?>
				</td>
				<?php
				}
				?>
				<td>
					<label class="left"><?php echo $level->level_desc; ?></label>
				</td>
				<?php 
				if($i == 3)
				{
				?>
				</tr><tr>
				<?php
				$i = 0;
				}
				endforeach; 
				?>
				<?php
				if($i != 0)
				{
				while($i <= 3)
				{
					echo'<td></td>';
					$i++;
				}
				}
				?>
				</tr>
			</table>
		</div>
		</div>
	</div>
	<div class="clearfix"></div>
	<input type="hidden" name="emp_id" id="emp_id" value=<?php echo $emp_user_data->emp_id; ?> />
	<input type="submit" name="Update" class="button success small submit_btns element_right" value="Update Grade Level Access" />
	<?=form_close(); ?>
</div>